#ifndef TIMECHART_BLCK_H
#define TIMECHART_BLCK_H

#include <QWidget>
#include <QTableWidget>
#include <QSettings>
#include <QTimer>
#include <QMessageBox>
namespace Ui {
class timechart_blck;
}

class timechart_blck : public QWidget
{
    Q_OBJECT

public:
    explicit timechart_blck(QWidget *parent = nullptr);
    ~timechart_blck();

private slots:
    void on_ui_btm_load_dir_clicked();

    void on_ui_btm_save_clicked();

    void on_ui_btm_read_clicked();

    void on_ui_date_start_dateChanged(const QDate &date);

    void on_table_day_double_click    (int row, int column);
    void on_table_week_double_click   (int row, int column);
    void on_table_quarter_double_click(int row, int column);
    void on_table_team_double_click   (int row, int column);

    void act_every10_minute();
    void on_ui_btm_finish_task_clicked();

    void on_ui_btm_fail_task_clicked();

    void on_ui_btm_cancel_task_clicked();

private:
    Ui::timechart_blck *ui;

    //增加参数保存
    QSettings *settings;
    // 增加时间存储表格
    QTableWidget *table_day;
    QTableWidget *table_week;
    QTableWidget *table_quarter;
    QTableWidget *table_team;
    // 增加表格存储的函数
    void act_table_save(QString fname, QTableWidget *table);
    void act_table_read(QString fname, QTableWidget *table);
    void act_file_create(QString fname, QTableWidget *table);
    void act_table_ini_head();
    //增加整点检查，实现定时弹窗
    QTimer *time_10m; //10分钟检查一次

};

#endif // TIMECHART_BLCK_H
